Dynamic Window GAM Analysis: Comprehensive Synthesis

Author

Kyle Nessen

Published

October 3, 2025

1 Background

This document synthesizes results from two parallel GAM analyses investigating the relationship between weather conditions and monarch butterfly roost abandonment. Both analyses address feedback from Francis regarding temporal alignment of weather predictors with butterfly responses.

The original daily-level analysis used fixed 6am-6pm weather windows, which Francis identified as having a temporal logic issue:

“All of the metrics for wind, temperature and light, would need to be re-calculated for 24 hour periods that begin at the time of the highest count.”

Francis’s key points:

  1. Temporal alignment: Butterflies can only respond to weather after it occurs
  2. Biological timing: If max count occurred at 2pm on day t-1, the relevant weather window should start at 2pm, not 6am
  3. Roosting decisions: Weather from max count through sunset determines whether butterflies abandon the roost

1.1 Two-Window Comparison Approach

To address this feedback while exploring biological relevance, we conducted two parallel analyses:

Sunset Window Analysis (variable-length windows):

  • Weather window: time_of_max_count_t_1last_observation_time_t (functional sunset)
  • Mean duration: 29.6 hours (range: 22.5-34.9 hours)
  • Captures overnight conditions through sunset when roosting decisions finalize
  • Tests: “Do conditions from peak count to sunset predict roost abandonment?”
  • Data: monarch_daily_lag_analysis_sunset_window.csv (n=103 lag pairs)

24-Hour Window Analysis (fixed-length windows):

  • Weather window: time_of_max_count_t_1+24 hours
  • Fixed duration: exactly 24 hours for all observations
  • Standardized exposure period following peak count
  • Tests: “Do conditions in 24 hours following peak count predict roost abandonment?”
  • Data: monarch_daily_lag_analysis_24hr_window.csv (n=94 lag pairs)

Both analyses use identical modeling approaches to enable direct comparison of results across window definitions.


2 Response Variable Selection

We evaluated three butterfly difference metrics (max, 95th percentile, and top 3 mean) with three transformations each (untransformed, square root, and square) to determine which best approximates normality for GAM modeling.

2.1 Normality Testing Results

Shapiro-Wilk Normality Tests for Response Variable Transformations (sorted by W statistic)
variable shapiro_stat p_value skewness kurtosis n
butterfly_diff_sqrt 0.9893 0.6368 0.2251 -0.3143 96
butterfly_diff_95th_sqrt 0.9880 0.5411 0.0120 -0.6497 96
butterfly_diff_top3_sqrt 0.9875 0.5027 0.0266 -0.6207 96
butterfly_diff_95th 0.9182 0.0000 -0.3705 2.0466 96
butterfly_diff_top3 0.9126 0.0000 -0.0126 2.4706 96
butterfly_diff 0.8835 0.0000 0.3794 4.3938 96
butterfly_diff_95th_sq 0.6591 0.0000 -1.2037 9.1440 96
butterfly_diff_top3_sq 0.6327 0.0000 0.6220 10.0799 96
butterfly_diff_sq 0.5307 0.0000 1.9996 19.7056 96

2.2 Selected Response Variable

butterfly_diff_sqrt was selected as the response variable for both analyses based on having the highest Shapiro-Wilk W statistic, indicating best approximation to normality.

This represents the square root transformation of the change in maximum butterfly count from day t-1 to day t. The transformation:

Response Variable Distributions

3 Candidate Predictor Variables

A total of 19 candidate predictors (3 baseline butterfly metrics + 16 weather/window metrics) were calculated within each observation’s dynamic window:

Candidate Predictor Variables: All 19 weather and baseline metrics calculated for dynamic windows
Variable Category Description
max_butterflies_t_1 Baseline Maximum butterfly count on previous day
butterflies_95th_percentile_t_1 Baseline 95th percentile count on previous day
butterflies_top3_mean_t_1 Baseline Mean of top 3 counts on previous day
temp_min Temperature Minimum temperature in lag window
temp_max Temperature Maximum temperature in lag window
temp_mean Temperature Mean temperature in lag window
temp_at_max_count_t_1 Temperature Temperature at time of maximum count on t-1
hours_above_15C Temperature Cumulative Hours ≥15°C in lag window
degree_hours_above_15C Temperature Cumulative degree-hours above 15°C
wind_avg_sustained Wind Mean sustained wind speed in lag window
wind_max_gust Wind Maximum wind gust in lag window
wind_gust_sum Wind Sum of all gust measurements in lag window
wind_gust_sum_above_2ms Wind Sum of gusts >2 m/s (threshold-based wind exposure)
wind_gust_hours Wind Gust-hours (integral approximation of wind exposure over time)
wind_minutes_above_2ms Wind Minutes with wind speed ≥2 m/s
wind_gust_sd Wind Standard deviation of gust speeds
wind_mode_gust Wind Most frequent gust speed (modal wind conditions)
sum_butterflies_direct_sun Sun Exposure Sum of butterflies observed in direct sunlight across entire lag window
lag_duration_hours Window Duration of lag window in hours. Used only for sunset analysis as a control variable.

3.1 Full Correlation Matrix (All Candidates)

The full correlation matrix reveals substantial multicollinearity among candidate predictors, particularly within variable categories:

Full Correlation Matrix: All Candidate Predictors

These patterns guided predictor selection to avoid multicollinearity issues.

3.2 Selected Predictors Correlation Matrix

Based on correlation structure, biological relevance, and variance inflation considerations, we selected 5 final predictors representing distinct aspects of weather exposure:

Correlation Matrix: Selected 5 Predictors

Final predictor set:

  1. temp_min - Minimum temperature
  2. temp_max - Maximum temperature
  3. temp_at_max_count_t_1 - Temperature at time of peak count
  4. wind_max_gust - Maximum wind gust, matching 30 minute analysis
  5. sum_butterflies_direct_sun - Total minutes butterflies exposed to direct sun

3.2.1 Wind Gust Mode: An Excluded Variable

wind_gust_mode was initially considered as a candidate predictor due to its low correlation with other wind metrics (r < 0.3 with wind_max_gust). However, wind_gust_mode had to be excluded from model fitting due to having only 5 unique values across all observations. This extreme discretization caused model convergence issues.


4 Model Building Strategy

Both analyses employed an identical systematic model-building approach to ensure comparability.

4.1 Model Space Exploration

We fit 76 models spanning a hierarchy of complexity:

  1. Null models (2): Intercept only, with smooth vs. linear baseline
  2. Single predictor models (10): Each of 5 predictors, smooth vs. linear
  3. Interaction-only models (20): All 2-way interactions, smooth vs. linear
  4. Additive models (14): Multiple predictors without interactions, smooth vs. linear
  5. Main + Interaction models (20): Additive + selected interactions, smooth vs. linear
  6. Complex models (8): All temperatures, all temps + wind, etc.
  7. Full models (2): All predictors + all interactions, smooth vs. linear

4.2 GAM Structure

All models were fitted using gamm() (Generalized Additive Mixed Model) with the same core structure:

gamm(
  butterfly_diff_sqrt ~ [baseline controls] + [weather predictors],
  data = model_data,
  random = list(deployment_id = ~1),
  correlation = corAR1(form = ~ observation_order_t | deployment_id),
  method = "REML"
)

Key components:

  • Response: butterfly_diff_sqrt (square root transformed change in maximum count)
  • Baseline controls: max_butterflies_t_1 (both analyses) + lag_duration_hours (for sunset analysis only)
  • Random effects: random = list(deployment_id = ~1) accounts for repeated measures
  • Temporal autocorrelation: AR(1) structure within deployments
  • Weather predictors: Smooth s() or tensor interaction ti() terms
  • Family: Gaussian with identity link (justified by normality of transformed response)

4.3 Overfitting Controls & Model Selection

Earlier analyses selected full models despite df/n ≈ 0.5. To prevent overfitting with small sample sizes (n=94-103):

  • Primary criterion: AICc (corrected AIC for small samples)
  • Overfitting flags: df/n > 0.3 (High risk), df/n > 0.2 (Moderate risk)
  • Cross-validation: Leave-one-deployment-out CV on top 10 models
  • Alternative criteria: BIC, AIC weights, ΔAICc

Selection: Best model = lowest AICc; competitive models ΔAICc < 2


5 Sunset Window Analysis Results

5.1 Model Comparison

The table below shows the top 5 models ranked by AICc for the sunset window analysis:

Top 5 Models: Sunset Window Analysis (ranked by AICc)
model description AICc delta_AICc weight_AICc df obs_per_param overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 640.22 0.00 0.7993 11 8.73 Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 644.13 3.90 0.1135 15 6.40 Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 648.52 8.29 0.0126 15 6.40 Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 648.85 8.63 0.0107 9 10.67 Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 649.34 9.12 0.0084 11 8.73 Low

5.2 Best Model Summary

Model M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction only)

5.3 Model Summary

Family: gaussian
Link function: identity

Formula:
butterfly_diff_sqrt ~ max_butterflies_t_1 + lag_duration_hours +
    ti(wind_max_gust, sum_butterflies_direct_sun)

Parametric coefficients:
                     Estimate Std. Error t value Pr(>|t|)
(Intercept)          9.426342   5.516001   1.709   0.0911 .
max_butterflies_t_1 -0.029745   0.005963  -4.988 3.12e-06 ***
lag_duration_hours  -0.190296   0.178387  -1.067   0.2891
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
                                               edf Ref.df     F  p-value
ti(wind_max_gust,sum_butterflies_direct_sun) 6.679  6.679 4.097 0.000832 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.397
  Scale est. = 41.056    n = 96

5.4 Partial Effects Plots

Sunset Window: Best Model Partial Effects

5.5 Model Diagnostics

Sunset Window: Residual Diagnostics

5.6 Autocorrelation Diagnostics

Sunset Window: ACF/PACF Plots

The ACF and PACF plots show residual autocorrelation structure after accounting for AR(1) correlation structure in the model.


6 24-Hour Window Analysis Results

6.1 Model Comparison

The table below shows the top 5 models ranked by AICc for the 24-hour window analysis:

Top 5 Models: 24-Hour Window Analysis (ranked by AICc)
model description AICc delta_AICc weight_AICc df obs_per_param overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 636.33 0.00 0.5073 9 10.44 Low
M23 Interaction: temp_max × wind_max_gust (smooth) 639.92 3.59 0.0844 9 10.44 Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 640.76 4.42 0.0555 9 10.44 Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 641.11 4.78 0.0466 9 10.44 Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 641.72 5.39 0.0342 13 7.23 Low

6.2 Best Model Summary

Model M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction only)

6.3 Model Summary

Family: gaussian
Link function: identity

Formula:
butterfly_diff_sqrt ~ s(max_butterflies_t_1, k = 5) +
    ti(wind_max_gust, sum_butterflies_direct_sun)

Parametric coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)   -1.099      1.101  -0.998    0.321

Approximate significance of smooth terms:
                                               edf Ref.df      F p-value
s(max_butterflies_t_1)                       2.125  2.125 13.757   1e-05 ***
ti(wind_max_gust,sum_butterflies_direct_sun) 3.537  3.537  3.594  0.0196 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.232
  Scale est. = 52.881    n = 94

Note: The 24-hour window has constant duration (24 hours for all observations), so lag_duration_hours is not included as a predictor.

6.4 Partial Effects Plots

24-Hour Window: Best Model Partial Effects

6.5 Model Diagnostics

24-Hour Window: Residual Diagnostics

6.6 Autocorrelation Diagnostics

24-Hour Window: ACF/PACF Plots

The ACF and PACF plots show residual autocorrelation structure after accounting for AR(1) correlation structure in the model.


7 Window Comparison: Convergent Results

Both the sunset window (variable-length, ending at functional sunset) and 24-hour window (fixed-length, standardized duration) analyses yielded the same best model:

M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction)

This convergence provides strong evidence that the wind × sun interaction is robust across different temporal window definitions.

Comparison of Wind × Sun Interaction Across Window Types

8 Model Fitting Notes

8.1 Convergence

All 76 models (in both analyses) converged successfully with the following exceptions:

  • Models including wind_gust_mode failed to converge (variable excluded)
  • Full models (M71, M72) converged but flagged as high overfitting risk (df/n > 0.4)

8.2 Computational Details

  • Software: R 4.x, mgcv package for GAM fitting
  • Optimization: Outer iteration with GCV/REML for smoothness selection
  • Basis dimensions: Default k values, checked via gam.check()
  • AR1 correlation: Fitted via gamm() using nlme correlation structures

8.3 Data Filtering

Both analyses filtered observations to:

  • metrics_complete >= 0.95 (≥95% weather data completeness)
  • Complete cases for all 5 selected predictors
  • Sunset window: n = 103 → 96 after filtering
  • 24-hour window: n = 94 → 94 (no additional filtering)

9 Appendix: Full Model Comparison Tables

9.1 Sunset Window: All 76 Models

Complete Model Comparison: Sunset Window Analysis (all 76 models)
model description AICc delta_AICc weight_AICc baseline_type model_category overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 640.22 0.00 7.99e-01 Smooth Interaction only Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 644.13 3.90 1.13e-01 Smooth Main + Interaction Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 648.52 8.29 1.26e-02 Smooth Main + Interaction Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 648.85 8.63 1.07e-02 Linear Interaction only Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 649.34 9.12 8.36e-03 Smooth Interaction only Low
M5 Single: temp_max (smooth) 649.46 9.23 7.90e-03 Smooth Single predictor Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 649.74 9.52 6.86e-03 Smooth Interaction only Low
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 650.12 9.89 5.68e-03 Smooth Main + Interaction Low
M23 Interaction: temp_max × wind_max_gust (smooth) 650.17 9.95 5.53e-03 Smooth Interaction only Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 650.52 10.30 4.64e-03 Smooth Main + Interaction Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 651.39 11.17 3.00e-03 Smooth Main + Interaction Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 651.78 11.56 2.47e-03 Smooth Interaction only Low
M59 Additive: temp_max + wind_max_gust (smooth) 652.14 11.92 2.06e-03 Smooth Additive Low
M55 Additive: temp_min + temp_max (smooth) 652.25 12.03 1.96e-03 Smooth Additive Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 652.64 12.42 1.61e-03 Smooth Interaction only Low
M17 Interaction: temp_min × wind_max_gust (smooth) 652.73 12.51 1.54e-03 Smooth Interaction only Low
M11 Single: sum_butterflies_direct_sun (smooth) 652.82 12.60 1.47e-03 Smooth Single predictor Low
M13 Interaction: temp_min × temp_max (smooth) 652.93 12.71 1.39e-03 Smooth Interaction only Low
M1 Null (smooth baseline) 653.17 12.95 1.23e-03 Smooth Null Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 653.48 13.26 1.06e-03 Smooth Interaction only Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 653.70 13.47 9.48e-04 Smooth Interaction only Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 653.88 13.66 8.66e-04 Smooth Main + Interaction Low
M7 Single: temp_at_max_count_t_1 (smooth) 653.91 13.68 8.54e-04 Smooth Single predictor Low
M52 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (linear) 654.45 14.23 6.51e-04 Linear Main + Interaction Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 654.72 14.50 5.67e-04 Smooth Main + Interaction Low
M3 Single: temp_min (smooth) 655.44 15.21 3.97e-04 Smooth Single predictor Low
M9 Single: wind_max_gust (smooth) 655.52 15.30 3.81e-04 Smooth Single predictor Low
M53 Additive: All temperature (smooth) 655.96 15.73 3.06e-04 Smooth Additive Low
M67 All temp + all temp interactions (smooth) 656.75 16.53 2.06e-04 Smooth Complex Moderate
M20 Interaction: temp_min × sum_butterflies_direct_sun (linear) 656.77 16.55 2.04e-04 Linear Interaction only Low
M35 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (smooth) 657.01 16.79 1.81e-04 Smooth Main + Interaction Low
M61 Additive: temp_at_max_count_t_1 + wind_max_gust (smooth) 657.30 17.08 1.56e-04 Smooth Additive Low
M57 Additive: temp_min + wind_max_gust (smooth) 657.68 17.46 1.29e-04 Smooth Additive Low
M46 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (linear) 657.70 17.47 1.28e-04 Linear Main + Interaction Low
M30 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (linear) 657.90 17.68 1.16e-04 Linear Interaction only Low
M44 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (linear) 658.01 17.79 1.10e-04 Linear Main + Interaction Low
M6 Single: temp_max (linear) 658.09 17.87 1.05e-04 Linear Single predictor Low
M47 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (smooth) 658.22 17.99 9.90e-05 Smooth Main + Interaction Low
M24 Interaction: temp_max × wind_max_gust (linear) 658.24 18.02 9.77e-05 Linear Interaction only Low
M40 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (linear) 658.42 18.20 8.92e-05 Linear Main + Interaction Low
M37 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (smooth) 658.61 18.39 8.12e-05 Smooth Main + Interaction Low
M34 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (linear) 658.93 18.71 6.91e-05 Linear Main + Interaction Low
M65 Additive: All predictors (additive) (smooth) 659.21 18.98 6.03e-05 Smooth Additive Low
M63 Additive: All temp + wind (smooth) 659.30 19.07 5.76e-05 Smooth Additive Low
M26 Interaction: temp_max × sum_butterflies_direct_sun (linear) 659.93 19.71 4.21e-05 Linear Interaction only Low
M56 Additive: temp_min + temp_max (linear) 660.55 20.32 3.08e-05 Linear Additive Low
M60 Additive: temp_max + wind_max_gust (linear) 660.76 20.54 2.77e-05 Linear Additive Low
M16 Interaction: temp_min × temp_at_max_count_t_1 (linear) 660.78 20.55 2.75e-05 Linear Interaction only Low
M18 Interaction: temp_min × wind_max_gust (linear) 661.01 20.79 2.44e-05 Linear Interaction only Low
M14 Interaction: temp_min × temp_max (linear) 661.32 21.10 2.10e-05 Linear Interaction only Low
M28 Interaction: temp_at_max_count_t_1 × wind_max_gust (linear) 661.49 21.27 1.92e-05 Linear Interaction only Low
M2 Null (linear baseline) 661.63 21.41 1.79e-05 Linear Null Low
M22 Interaction: temp_max × temp_at_max_count_t_1 (linear) 662.25 22.03 1.31e-05 Linear Interaction only Low
M12 Single: sum_butterflies_direct_sun (linear) 662.35 22.13 1.25e-05 Linear Single predictor Low
M42 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (linear) 662.96 22.74 9.24e-06 Linear Main + Interaction Low
M4 Single: temp_min (linear) 663.33 23.10 7.69e-06 Linear Single predictor Low
M50 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (linear) 663.53 23.31 6.93e-06 Linear Main + Interaction Low
M54 Additive: All temperature (linear) 663.59 23.36 6.75e-06 Linear Additive Low
M10 Single: wind_max_gust (linear) 663.79 23.57 6.09e-06 Linear Single predictor Low
M69 All additive + all temp×wind interactions (smooth) 663.97 23.74 5.58e-06 Smooth Complex Moderate
M8 Single: temp_at_max_count_t_1 (linear) 664.37 24.15 4.56e-06 Linear Single predictor Low
M68 All temp + all temp interactions (linear) 664.52 24.30 4.23e-06 Linear Complex Moderate
M58 Additive: temp_min + wind_max_gust (linear) 665.47 25.25 2.63e-06 Linear Additive Low
M38 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (linear) 666.02 25.80 1.99e-06 Linear Main + Interaction Low
M36 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (linear) 666.63 26.41 1.48e-06 Linear Main + Interaction Low
M62 Additive: temp_at_max_count_t_1 + wind_max_gust (linear) 666.68 26.46 1.43e-06 Linear Additive Low
M64 Additive: All temp + wind (linear) 666.83 26.61 1.33e-06 Linear Additive Low
M48 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (linear) 666.96 26.73 1.25e-06 Linear Main + Interaction Low
M66 Additive: All predictors (additive) (linear) 668.00 27.78 7.41e-07 Linear Additive Low
M70 All additive + all temp×wind interactions (linear) 670.90 30.68 1.74e-07 Linear Complex Moderate
M72 FULL MODEL: All terms + all interactions (linear) 710.96 70.74 3.49e-16 Linear Full model High
M71 FULL MODEL: All terms + all interactions (smooth) 712.61 72.39 1.53e-16 Smooth Full model High

9.2 24-Hour Window: All 76 Models

Complete Model Comparison: 24-Hour Window Analysis (all 76 models)
model description AICc delta_AICc weight_AICc baseline_type model_category overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 636.33 0.00 5.07e-01 Smooth Interaction only Low
M23 Interaction: temp_max × wind_max_gust (smooth) 639.92 3.59 8.44e-02 Smooth Interaction only Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 640.76 4.42 5.55e-02 Smooth Interaction only Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 641.11 4.78 4.66e-02 Smooth Interaction only Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 641.72 5.39 3.42e-02 Smooth Main + Interaction Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 641.80 5.46 3.30e-02 Smooth Main + Interaction Low
M5 Single: temp_max (smooth) 642.19 5.86 2.71e-02 Smooth Single predictor Low
M67 All temp + all temp interactions (smooth) 642.49 6.16 2.33e-02 Smooth Complex Moderate
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 642.69 6.36 2.11e-02 Smooth Main + Interaction Low
M17 Interaction: temp_min × wind_max_gust (smooth) 642.73 6.40 2.07e-02 Smooth Interaction only Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 642.75 6.42 2.05e-02 Smooth Interaction only Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 642.90 6.57 1.90e-02 Smooth Main + Interaction Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 643.73 7.40 1.26e-02 Smooth Main + Interaction Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 643.79 7.46 1.22e-02 Smooth Interaction only Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 644.33 8.00 9.30e-03 Linear Interaction only Low
M53 Additive: All temperature (smooth) 644.61 8.28 8.09e-03 Smooth Additive Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 644.95 8.62 6.82e-03 Smooth Interaction only Low
M59 Additive: temp_max + wind_max_gust (smooth) 645.02 8.69 6.59e-03 Smooth Additive Low
M55 Additive: temp_min + temp_max (smooth) 645.02 8.69 6.58e-03 Smooth Additive Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 645.52 9.19 5.13e-03 Smooth Interaction only Low
M1 Null (smooth baseline) 645.54 9.21 5.07e-03 Smooth Null Low
M13 Interaction: temp_min × temp_max (smooth) 645.90 9.57 4.23e-03 Smooth Interaction only Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 646.00 9.66 4.04e-03 Smooth Main + Interaction Low
M7 Single: temp_at_max_count_t_1 (smooth) 646.19 9.86 3.67e-03 Smooth Single predictor Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 646.79 10.46 2.72e-03 Smooth Main + Interaction Low
M3 Single: temp_min (smooth) 647.30 10.97 2.10e-03 Smooth Single predictor Low
M24 Interaction: temp_max × wind_max_gust (linear) 647.38 11.05 2.02e-03 Linear Interaction only Low
M9 Single: wind_max_gust (smooth) 647.82 11.49 1.62e-03 Smooth Single predictor Low
M11 Single: sum_butterflies_direct_sun (smooth) 648.02 11.69 1.47e-03 Smooth Single predictor Low
M30 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (linear) 648.22 11.89 1.33e-03 Linear Interaction only Low
M35 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (smooth) 648.40 12.06 1.22e-03 Smooth Main + Interaction Low
M63 Additive: All temp + wind (smooth) 648.58 12.25 1.11e-03 Smooth Additive Low
M20 Interaction: temp_min × sum_butterflies_direct_sun (linear) 648.79 12.46 9.98e-04 Linear Interaction only Low
M68 All temp + all temp interactions (linear) 648.97 12.64 9.13e-04 Linear Complex Moderate
M37 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (smooth) 649.34 13.01 7.58e-04 Smooth Main + Interaction Low
M61 Additive: temp_at_max_count_t_1 + wind_max_gust (smooth) 649.36 13.03 7.51e-04 Smooth Additive Low
M47 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (smooth) 649.59 13.26 6.70e-04 Smooth Main + Interaction Low
M52 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (linear) 649.81 13.48 6.01e-04 Linear Main + Interaction Low
M18 Interaction: temp_min × wind_max_gust (linear) 650.19 13.86 4.96e-04 Linear Interaction only Low
M57 Additive: temp_min + wind_max_gust (smooth) 650.20 13.86 4.95e-04 Smooth Additive Low
M26 Interaction: temp_max × sum_butterflies_direct_sun (linear) 650.34 14.01 4.61e-04 Linear Interaction only Low
M44 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (linear) 650.36 14.03 4.56e-04 Linear Main + Interaction Low
M16 Interaction: temp_min × temp_at_max_count_t_1 (linear) 650.75 14.42 3.75e-04 Linear Interaction only Low
M6 Single: temp_max (linear) 651.09 14.76 3.16e-04 Linear Single predictor Low
M46 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (linear) 651.41 15.08 2.70e-04 Linear Main + Interaction Low
M42 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (linear) 652.00 15.67 2.01e-04 Linear Main + Interaction Low
M65 Additive: All predictors (additive) (smooth) 652.07 15.73 1.94e-04 Smooth Additive Low
M28 Interaction: temp_at_max_count_t_1 × wind_max_gust (linear) 652.41 16.08 1.64e-04 Linear Interaction only Low
M34 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (linear) 652.81 16.48 1.34e-04 Linear Main + Interaction Low
M22 Interaction: temp_max × temp_at_max_count_t_1 (linear) 652.98 16.65 1.23e-04 Linear Interaction only Low
M2 Null (linear baseline) 653.04 16.71 1.20e-04 Linear Null Low
M54 Additive: All temperature (linear) 653.07 16.74 1.17e-04 Linear Additive Low
M14 Interaction: temp_min × temp_max (linear) 653.40 17.06 1.00e-04 Linear Interaction only Low
M56 Additive: temp_min + temp_max (linear) 653.55 17.21 9.27e-05 Linear Additive Low
M60 Additive: temp_max + wind_max_gust (linear) 653.72 17.39 8.51e-05 Linear Additive Low
M40 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (linear) 653.82 17.49 8.08e-05 Linear Main + Interaction Low
M69 All additive + all temp×wind interactions (smooth) 654.00 17.67 7.39e-05 Smooth Complex Moderate
M50 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (linear) 654.12 17.79 6.96e-05 Linear Main + Interaction Low
M8 Single: temp_at_max_count_t_1 (linear) 654.78 18.45 5.01e-05 Linear Single predictor Low
M4 Single: temp_min (linear) 654.82 18.49 4.90e-05 Linear Single predictor Low
M10 Single: wind_max_gust (linear) 655.34 19.01 3.78e-05 Linear Single predictor Low
M12 Single: sum_butterflies_direct_sun (linear) 655.95 19.62 2.78e-05 Linear Single predictor Low
M36 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (linear) 656.03 19.70 2.68e-05 Linear Main + Interaction Low
M64 Additive: All temp + wind (linear) 656.48 20.15 2.14e-05 Linear Additive Low
M38 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (linear) 656.56 20.22 2.06e-05 Linear Main + Interaction Low
M62 Additive: temp_at_max_count_t_1 + wind_max_gust (linear) 657.31 20.98 1.41e-05 Linear Additive Low
M48 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (linear) 657.32 20.99 1.40e-05 Linear Main + Interaction Low
M58 Additive: temp_min + wind_max_gust (linear) 657.60 21.27 1.22e-05 Linear Additive Low
M66 Additive: All predictors (additive) (linear) 659.86 23.53 3.94e-06 Linear Additive Low
M70 All additive + all temp×wind interactions (linear) 660.18 23.85 3.36e-06 Linear Complex Moderate
M71 FULL MODEL: All terms + all interactions (smooth) 699.80 63.47 8.37e-15 Smooth Full model High
M72 FULL MODEL: All terms + all interactions (linear) 703.91 67.58 1.07e-15 Linear Full model High

10 References


Document generated: 2025-10-03